<template>
	<view class="container">
		 <ws-carema v-if="showType" ref="carema" :get-photo="true" @scanItem="scanItem"></ws-carema>
		 <!--<ws-carema v-if="showType" ref="carema" :get-photo="true" @scanItem="scanItem"></ws-carema>-->
        <!--<button v-if="showType2" @click="show()">打开扫码</button>-->
	</view>
</template>

<script>
	import WsCarema from "@/components/ws-carema/index.vue"
	export default {
		components: {WsCarema},
		data() {
			return {
				showType:true,
				// showType:false,
				// showType2:true,
			}
		},
		onLoad() {
		},
		methods: {
			scanItem(res) {
				console.log(res)
			},
			show(){
				this.showType = true;
				this.showType2 = false;
			},
			test(){

		   },
			re(url){
				console.log(url)
				uni.downloadFile({
					url: url, //仅为示例，并非真实的资源
					success: (res) => {
						console.log(res);
						if (res.statusCode === 200) {
							console.log('下载成功');
						}
					}
				});
			},

		}
	}

</script>
